package com.hsjk.szwj.module.pay.service;

import com.hsjk.szwj.module.pay.controller.admin.division.vo.AdminDivisionAccountTypeReqVO;
import com.hsjk.szwj.module.pay.controller.admin.division.vo.AdminDivisionAccountTypeRespVO;
import com.hsjk.szwj.module.pay.dal.dataobject.config.ChannelRetMsg;
import com.hsjk.szwj.module.pay.dal.dataobject.config.MchAppConfigContext;
import com.hsjk.szwj.module.pay.dal.dataobject.division.MchDivisionReceiverDO;
import com.hsjk.szwj.module.pay.dal.dataobject.order.PayOrderDO;
import com.hsjk.szwj.module.pay.dal.dataobject.order.PayOrderDivisionRecordDO;

import java.util.HashMap;
import java.util.List;

/**
 * @author chenjiawei
 * @desc 分账接口
 * @Date 2023/08/25 09:20
 **/
public interface IDivisionService {
    /**
     * 获取到接口code
     **/
    String getIfCode();

    /**
     * 是否支持该分账
     */
    boolean isSupport();

    /**
     * 绑定关系
     **/
    ChannelRetMsg bind(MchDivisionReceiverDO mchDivisionReceiver,
                       MchAppConfigContext mchAppConfigContext);

    /**
     * 单次分账 （无需调用完结接口，或自动解冻商户资金)
     **/
    ChannelRetMsg singleDivision(PayOrderDO payOrder,
                                 List<PayOrderDivisionRecordDO> recordList,
                                 MchAppConfigContext mchAppConfigContext);

    /**
     * 查询分账结果
     **/
    HashMap<Long, ChannelRetMsg> queryDivision(PayOrderDO payOrder,
                                               List<PayOrderDivisionRecordDO> recordList, MchAppConfigContext mchAppConfigContext);

    /**
     * 根据账号类型获取分账账号信息
     *
     * @param reqVO
     * @return com.hsjk.szwj.module.pay.controller.admin.division.vo.AdminDivisionAccountTypeRespVO
     * @author chenjiawei
     * @date 2023/12/3 11:51 PM
     **/
    List<AdminDivisionAccountTypeRespVO> getAdminDivisionAccountInfo(AdminDivisionAccountTypeReqVO reqVO);

}
